<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cr-term: Libcroco Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Libcroco Reference Manual">
<link rel="up" href="ch01.html" title="Extensive APIs description">
<link rel="prev" href="libcroco-cr-stylesheet.html" title="cr-stylesheet">
<link rel="next" href="libcroco-cr-tknzr.html" title="cr-tknzr">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libcroco-cr-term.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libcroco-cr-stylesheet.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libcroco-cr-tknzr.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libcroco-cr-term"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libcroco-cr-term.top_of_page"></a>cr-term</span></h2>
<p>cr-term</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libcroco-cr-term.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-parse-expression-from-buf" title="cr_term_parse_expression_from_buf ()">cr_term_parse_expression_from_buf</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-new" title="cr_term_new ()">cr_term_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-number" title="cr_term_set_number ()">cr_term_set_number</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-function" title="cr_term_set_function ()">cr_term_set_function</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-string" title="cr_term_set_string ()">cr_term_set_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-ident" title="cr_term_set_ident ()">cr_term_set_ident</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-uri" title="cr_term_set_uri ()">cr_term_set_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-rgb" title="cr_term_set_rgb ()">cr_term_set_rgb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-set-hash" title="cr_term_set_hash ()">cr_term_set_hash</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-append-term" title="cr_term_append_term ()">cr_term_append_term</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-prepend-term" title="cr_term_prepend_term ()">cr_term_prepend_term</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-to-string" title="cr_term_to_string ()">cr_term_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-one-to-string" title="cr_term_one_to_string ()">cr_term_one_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-dump" title="cr_term_dump ()">cr_term_dump</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-nr-values" title="cr_term_nr_values ()">cr_term_nr_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-get-from-list" title="cr_term_get_from_list ()">cr_term_get_from_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-ref" title="cr_term_ref ()">cr_term_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-unref" title="cr_term_unref ()">cr_term_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-term.html#cr-term-destroy" title="cr_term_destroy ()">cr_term_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-term.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm">CRTerm</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-term.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libcroco-cr-term.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cr-term-parse-expression-from-buf"></a><h3>cr_term_parse_expression_from_buf ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
cr_term_parse_expression_from_buf (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *a_buf</code></em>,
                                   <em class="parameter"><code><span class="type">enum CREncoding</span> a_encoding</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-new"></a><h3>cr_term_new ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
cr_term_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-number"></a><h3>cr_term_set_number ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_number (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                    <em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> *a_num</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-function"></a><h3>cr_term_set_function ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_function (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                      <em class="parameter"><code><a class="link" href="libcroco-cr-string.html#CRString" title="struct CRString"><span class="type">CRString</span></a> *a_func_name</code></em>,
                      <em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_func_param</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-string"></a><h3>cr_term_set_string ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_string (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                    <em class="parameter"><code><a class="link" href="libcroco-cr-string.html#CRString" title="struct CRString"><span class="type">CRString</span></a> *a_str</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-ident"></a><h3>cr_term_set_ident ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_ident (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                   <em class="parameter"><code><a class="link" href="libcroco-cr-string.html#CRString" title="struct CRString"><span class="type">CRString</span></a> *a_str</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-uri"></a><h3>cr_term_set_uri ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_uri (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                 <em class="parameter"><code><a class="link" href="libcroco-cr-string.html#CRString" title="struct CRString"><span class="type">CRString</span></a> *a_str</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-rgb"></a><h3>cr_term_set_rgb ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_rgb (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                 <em class="parameter"><code><a class="link" href="libcroco-cr-rgb.html#CRRgb" title="struct CRRgb"><span class="type">CRRgb</span></a> *a_rgb</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-set-hash"></a><h3>cr_term_set_hash ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_term_set_hash (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                  <em class="parameter"><code><a class="link" href="libcroco-cr-string.html#CRString" title="struct CRString"><span class="type">CRString</span></a> *a_str</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-append-term"></a><h3>cr_term_append_term ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
cr_term_append_term (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                     <em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_new_term</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-prepend-term"></a><h3>cr_term_prepend_term ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
cr_term_prepend_term (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                      <em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_new_term</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-to-string"></a><h3>cr_term_to_string ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
cr_term_to_string (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-one-to-string"></a><h3>cr_term_one_to_string ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
cr_term_one_to_string (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-dump"></a><h3>cr_term_dump ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cr_term_dump (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> const *a_this</code></em>,
              <em class="parameter"><code><span class="type">FILE</span> *a_fp</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-nr-values"></a><h3>cr_term_nr_values ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
cr_term_nr_values (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-get-from-list"></a><h3>cr_term_get_from_list ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="returnvalue">CRTerm</span></a> *
cr_term_get_from_list (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>,
                       <em class="parameter"><code><span class="type">int</span> itemnr</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-ref"></a><h3>cr_term_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cr_term_ref (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-unref"></a><h3>cr_term_unref ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
cr_term_unref (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-term-destroy"></a><h3>cr_term_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cr_term_destroy (<em class="parameter"><code><a class="link" href="libcroco-cr-term.html#CRTerm" title="struct CRTerm"><span class="type">CRTerm</span></a> *a_term</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="libcroco-cr-term.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CRTerm"></a><h3>struct CRTerm</h3>
<pre class="programlisting">struct CRTerm {
        /**
         *The type of the term.
         */
        enum CRTermType type ;
                
        /**
         *The unary operator associated to
         *the current term.
         */
        enum UnaryOperator unary_op ;

        /**
         *The operator associated to the current term.
         */
        enum Operator the_operator ;


        /**
         *The content of the term.
         *Depending of the type of the term,
         *this holds either a number, a percentage ...
         */
        union
        {
                CRNum *num ;
                CRString * str ;
                CRRgb * rgb ;
        } content ;

        /**
         *If the term is of type UNICODERANGE, 
         *this field holds the upper bound of the range.
         *if the term is of type FUNCTION, this holds
         *an instance of CRTerm that represents
         * the expression which is the argument of the function.
         */
        union
        {
                CRTerm *func_param ;                        
        } ext_content ;

        /**
         *A spare pointer, just in case.
         *Can be used by the application.
         */
        gpointer app_data ;

        glong ref_count ;

        /**
         *A pointer to the next term, 
         *just in case this term is part of
         *an expression.
         */
        CRTerm *next ;

        /**
         *A pointer to the previous
         *term.
         */
        CRTerm *prev ;
        CRParsingLocation location ;
};
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>